<?php

use Illuminate\Database\Seeder;
use App\Menu;
class MenuSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //进行数据填充
        $index = new Menu;
        $index -> name = '欢迎页面';
        $index -> pid = 0;
        $index -> url = '/';
        $index->save();

        $user = new Menu;
        $user->name = "管理员控制";
        $user->pid = 0;
        $user->url = "";
        $user->save();


        $user_l = new Menu;
        $user_l->name = "管理员列表";
        $user_l->pid = $user->id;
        $user_l->url = "/admin/user";
        $user_l->save();

    }
}
